'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {

  // const auth = app.middleware.auth({title:"中间件"})
  const { router, controller } = app;
  router.get('/',controller.home.render);
  //http://127.0.0.1:7001/?apikey=eyJhbGciOiJIUzI1NiJ9.MTIzNDU2.jXGweo4iGdPngxob0efyzCoI5HMX04916NDDp7mrRms
  router.get('/top250', controller.home.top250);
  router.get('/article', controller.home.article);
  router.get('/detail', controller.detail.index);

  router.get('/collect',controller.collect.index);
  router.get('/cancel',controller.collect.cancel);
  router.get('/delete',controller.delete.index);
  router.post('/doAdd',controller.add.index);
  router.get('/doPage',controller.dopage.index);

  router.post('/Adetail',controller.adetail.index);
  
  router.post('/getToken', controller.token.index);
};
